import request from '@/utils/request'
/**
 * 交易相关
 */

//获取期权手续费
export function getSecondsFeeApi() {
   return request({
    url: '/api/microtrade/fee',
    method: 'get'
  })
}

// 获取期权交易时间列表
export function getSecondsListApi() {
  return request({
    url: '/api/microtrade/seconds',
    method: 'get'
  })
}
// 期权提交
export function postSecondsApi(data) {
  return request({
    url: '/api/microtrade/submitV2',
    method: 'post',
    data
  })
}
// 期权详情
export function getSecondsDetailApi(data) {
   return request({
    url: '/api/microtrade/getOrder',
    method: 'get',
    params: data
  })
}
// 获取期权记录
export function getSecondsOrderListApi(data) {
   return request({
    url: '/api/microtrade/listsV2',
    method: 'get',
    params: data
  })
}

// 获取锁仓列表
export function getLockListApi() {
   return request({
    url: '/api/lockorder/getorder',
    method: 'get'
  })
}
// 锁仓提交
export function postLockSubmitApi(data) {
   return request({
    url: '/api/lockorder/submit',
    method: 'post',
    data
  })
}
// 锁仓订单列表
export function getLockOrderListApi(data) {
   return request({
    url: '/api/lockorder/lists',
    method: 'get',
    params: data
  })
}

//获取合约手续费
export function getContractFeeApi() {
   return request({
    url: '/api/contractFee',
    method: 'get'
  })
}
// 合约提交
export function postContractSubmitApi(data) {
   return request({
    url: '/api/lever/submit',
    method: 'post',
    data
  })
}
// 合约订单
export function getContractOrderListApi(data) {
   return request({
    url: '/api/lever/my_trade',
    method: 'post',
    data
  })
}
// 合约平仓
export function postContractCloseApi(data) {
   return request({
    url: '/api/lever/close',
    method: 'post',
    data
  })
}
// 合约取消
export function postContractCancelApi(data) {
   return request({
    url: '/api/lever/cancel',
    method: 'post',
    data
  })
}



// 资金记录
export function getLegalHistoryListApi(data) {
   return request({
    url: '/api/wallet/legal_log',
    method: 'get',
    params: data
  })
}
